//
//  AMResponseFactory.m
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOResponseFactory.h"
#import "HOConstants.h"
#import "Logger.h"

@implementation HOResponseFactory
static HOResponseFactory *_instance;
+ (HOResponseFactory *)sharedInstance
{
    if(_instance == nil)
    {
        _instance = [[HOResponseFactory alloc] init];
    }
    return  _instance;
}

- (HOBaseResponseEntity *)getResponseWithRequest:(HOBaseRequestEntity *)request
{
    HOBaseResponseEntity *response = [[[HOBaseResponseEntity alloc] initWithRequest:request] autorelease];
    response.action = request.action;
    response.baseRequest = request;
    response.baseRequest.status = request.status;
    return response;
}
@end
